package com.lc.afbx.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/6/15.
 */
@HttpInlet(Conn.INLET_API_INTEGRAL_EXCHANGE)
public class PostApiExchanged extends BaseAsyPost<PostApiExchanged.Info> {

    public String userid, id;

    public PostApiExchanged(AsyCallBack<PostApiExchanged.Info> asyCallBack) {
        super(asyCallBack);
    }

    protected Info parser(JSONObject jsonObject) {

        TOAST = jsonObject.optString("message");

        if (jsonObject.optInt("code") == 200){

            Info info = new Info();
            info.code = jsonObject.optString("code");
            info.data = jsonObject.optString("data");
            info.message = jsonObject.optString("message");

            return info;
        }

        return null;

    }

    public static class Info {
        public String message, code, data;
    }
}
